<!--作者:于大明-->
<template>
	<view class="ad-tool-body">
		<uni-section :title="queryObj.text" type="line">
			<view class="bg-white p-2">
				<!-- 基础表单校验 -->
				<view v-if="!queryObj.userId">
					每日可免费使用5次，超过5次需要看广告解锁功能
					<view>
						今日剩余免费次数:
						<text class="text-red">{{vuex_adObj.count}}</text>次
					</view>
				</view>
				<uni-forms ref="valiForm" label-position="top">
					<uni-forms-item label="输入:" v-if="!queryObj.userId">
						<uni-easyinput type="textarea" v-model="queryObj.inputStr" placeholder="请输入字符串" />
					</uni-forms-item>

					<view class="d-flex">
						<button v-if="isShowAdBtn" type="primary" class="flex-1 mr-2"
							@tap="$emit('tjForm')">看广告解锁</button>
						<button v-else type="primary" class="flex-1 mr-2" @tap="$emit('dealClick')">处理</button>
						<button @tap="$util.exitApp()" v-if="queryObj.userId">退出程序</button>
					</view>

					<template v-if="!queryObj.userId">
						<uni-forms-item label="输出:" class="mt-1">
							<uni-easyinput :redonly="true" type="textarea" v-model="queryObj.outStr" />
						</uni-forms-item>
						<button size="mini" type="warn" @tap="$emit('copyOut')">复制输出</button>
					</template>

				</uni-forms>
			</view>
		</uni-section>

	</view>
</template>

<script src="./ad-tool-body.js"></script>

<style lang="less" scoped>
	@import url('ad-tool-body.less');
</style>